class AccountsObserver < ActiveRecord::Observer
  def after_create(accounts)
    AccountsMailer.deliver_signup_notification(accounts)
    #when account saved create entity Member
    accounts.create_member(:nick=>accounts.login)
    accounts.create_friendCondition
  end

  def after_save(accounts)
  
    AccountsMailer.deliver_activation(accounts) if accounts.recently_activated?
  
  end
end
